package com.fire.control.system.module.system.controller.app;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.fire.control.system.dto.AppManagerDto;
import com.fire.control.system.module.system.service.AppManagerService;
import com.fire.control.system.standard.BusinessInterfaceStandard;
import com.fire.control.system.support.protocol.comman.RequestProtocol;
import com.fire.control.system.support.protocol.comman.ResponseProtocol;

/**
 * 
 * @ClassName: AppManagerController
 * @Description: TODO (app升级管理)
 * @author: tanyuting
 * @date: 2017年7月1日 下午4:29:14
 */
@RestController
@RequestMapping(path = "web/appManager")
public class AppManagerController implements BusinessInterfaceStandard<RequestProtocol, ResponseProtocol> {

	
	@Autowired private AppManagerService appMapperService;
	

	/**
	 * 
	 * @Title: getAppManagerList
	 * @Description: TODO (app升级列表管理)
	 * @param appManagerDto
	 * @param p
	 * @return
	 * @return: ResponseProtocol
	 *@author: tanyuting
	 */
	@RequestMapping(path = "getAppManagerList",method=RequestMethod.POST)
	public ResponseProtocol getAppManagerList(AppManagerDto appManagerDto) {
		ResponseProtocol response = appMapperService.getAppManagerList(appManagerDto);
		return response;
	}
	
	
	
	
	/**
	 * 
	 * @Title: addAppManager
	 * @Description: TODO(添加app管理列表)
	 * @param appd
	 * @return
	 * @return: ResponseProtocol
	 *@author: tanyuting
	 */
	@RequestMapping(path = "addAppManager",method=RequestMethod.POST)
	public ResponseProtocol addAppManager(AppManagerDto appd){
		ResponseProtocol response = appMapperService.addAppManager(appd);	
		return response;
	

	}
	
	/**
	 * 
	 * @Title: updateAppManager
	 * @Description: TODO 修改app启用状态
	 * @param aid
	 * @return
	 * @return: ResponseProtocol
	 *@author:tanyuting
	 */
	@RequestMapping(path="updateAppManager",method=RequestMethod.POST)
	public ResponseProtocol updateAppManager(String aid){
		ResponseProtocol reProtocol=appMapperService.enableAppManagerStatus(aid);
		return reProtocol;
		
	}
}
